package com.czl.module_work.adapter

import android.text.TextUtils
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.czl.base.data.bean.OrderOperate
import com.czl.base.util.FormUtils
import com.czl.module_work.R
import com.czl.module_work.databinding.WorkItemOrderOperateBinding
import com.czl.module_work.databinding.WorkItemUploadCertificateBinding


/**
 * 创建日期：2022/1/8  12:26
 * 类说明:
 * @author：86152
 */
class OrderOperateAdapter :
    BaseQuickAdapter<OrderOperate, BaseDataBindingHolder<WorkItemOrderOperateBinding>>(R.layout.work_item_order_operate) {

    override fun convert(
        holder: BaseDataBindingHolder<WorkItemOrderOperateBinding>,
        item: OrderOperate
    ) {
        holder.dataBinding?.apply {
            state = item.operateState?:""
            remake = item.operateNote?:""
            date = if (TextUtils.isEmpty(item.createTime)) "" else FormUtils.dealDateFormat(
                item.createTime
            )
            isLast = holder.absoluteAdapterPosition == data.size-1
        }
    }
}